//package org.example.ecsp.application.controller;
//
//
//import cn.tedu.mivos.application.pojo.dto.ApplicationQuery;
//import cn.tedu.mivos.application.pojo.dto.ApplicationSaveParam;
//import cn.tedu.mivos.application.pojo.vo.ApplicationVO;
//import cn.tedu.mivos.application.service.ApplicationService;
//import cn.tedu.mivos.base.response.JsonResult;
//import lombok.extern.slf4j.Slf4j;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.web.bind.annotation.*;
//
//import java.util.List;
//
//@Slf4j
//@RestController
//@RequestMapping("/v1/application")
//public class ApplicationController {
//    @Autowired
//     ApplicationService applicationService;
//
//    @PostMapping("save")
//    public JsonResult saveApplication(ApplicationSaveParam applicationSaveParam) {
//        log.debug("开始处理新增申请的请求，参数：{}", applicationSaveParam);
//        applicationService.save(applicationSaveParam);
//        return JsonResult.ok();
//    }
//    @GetMapping("select")
//    public JsonResult selectApplication(ApplicationQuery applicationQuery) {
//        log.debug("开始处理查询申请单的请求，参数：{}", applicationQuery);
//        List<ApplicationVO> list = applicationService.selectApplication(applicationQuery);
//        return JsonResult.ok(list);
//    }
//
//    @PostMapping("cancel/{id}")
//    public JsonResult cancelApplication(@PathVariable Long id) {
//        log.debug("开始处理撤销申请的请求，参数：{}", id);
//        applicationService.cancel(id);
//        return JsonResult.ok();
//    }
//    @PostMapping("distribute/{applicationId}/{vehicleId}")
//    public JsonResult distributeApplication(@PathVariable Long applicationId,@PathVariable Long vehicleId) {
//        log.debug("开始处理分配申请的请求，参数：{}", applicationId);
//        applicationService.distribute(applicationId,vehicleId);
//        return JsonResult.ok();
//    }
//    @PostMapping("/back/{applicationId}/{vehicleId}")
//    public JsonResult backApplication(@PathVariable Long applicationId,@PathVariable Long vehicleId) {
//        log.debug("开始处理还车申请的请求，参数：{}", applicationId);
//        applicationService.back(applicationId,vehicleId);
//        return JsonResult.ok();
//    }
//}
